﻿<%@ Page Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="BattleCalc.aspx.cs"
    Inherits="smallDeimos.Game.GameTools.BattleCalc" Title="Small Deimos - Battle Calculator" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table>
        <tr>
            <th colspan="3">
                Defender
            </th>
            <th colspan="3">
                Attacker
            </th>
        </tr>
        <tr>
            <td>
                Destroyers
            </td>
            <td>
                <asp:TextBox runat="server" ID="DsDef" type="text" value="0" Width="80px" />
            </td>
            <td>
                <asp:Label runat="server" ID="DsDefLeft" type="text" Enabled="False" />
            </td>
            <td>
                Destroyers
            </td>
            <td>
                <asp:TextBox runat="server" ID="DsAtt" type="text" value="0" Width="80px" />
            </td>
            <td>
                <asp:Label runat="server" ID="DsAttLeft" type="text" Enabled="False" />
            </td>
        </tr>
        <tr>
            <td>
                Cruisers
            </td>
            <td>
                <asp:TextBox runat="server" ID="CrDef" type="text" value="0" Width="80px" />
            </td>
            <td>
                <asp:Label runat="server" ID="CrDefLeft" type="text" Enabled="False" />
            </td>
            <td>
                Cruisers
            </td>
            <td>
                <asp:TextBox runat="server" ID="CrAtt" type="text" value="0" Width="80px" />
            </td>
            <td>
                <asp:Label runat="server" ID="CrAttLeft" type="text" Enabled="False" />
            </td>
        </tr>
        <tr>
            <td>
                Battleships
            </td>
            <td>
                <asp:TextBox runat="server" ID="BsDef" type="text" value="0" Width="80px" />
            </td>
            <td>
                <asp:Label runat="server" ID="BsDefLeft" type="text" Enabled="False" />
            </td>
            <td>
                Battleships
            </td>
            <td>
                <asp:TextBox runat="server" ID="BsAtt" type="text" value="0" Width="80px" />
            </td>
            <td>
                <asp:Label runat="server" ID="BsAttLeft" type="text" Enabled="False" />
            </td>
        </tr>
        <tr>
            <td>
                Starbase
            </td>
            <td>
                <asp:TextBox runat="server" ID="Sb" type="text" value="0" Width="80px" />
            </td>
            <td>
                <asp:Label runat="server" ID="SbLeft" type="text" Enabled="False" />
            </td>
        </tr>
        <tr>
            <td>
                Attack bonus
            </td>
            <td colspan="2">
                <asp:TextBox runat="server" ID="DefAtt" type="text" value="0" Width="80px" />
            </td>
            <td>
                Attack bonus
            </td>
            <td colspan="2">
                <asp:TextBox runat="server" ID="AttAtt" type="text" value="0" Width="80px" />
            </td>
        </tr>
        <tr>
            <td>
                Defense bonus
            </td>
            <td colspan="2">
                <asp:TextBox runat="server" ID="DefDef" type="text" value="0" Width="80px" />
            </td>
            <td>
                Defense bonus
            </td>
            <td colspan="2">
                <asp:TextBox runat="server" ID="AttDef" type="text" value="0" Width="80px" />
            </td>
        </tr>
        <tr>
            <td>
                Physics
            </td>
            <td colspan="2">
                <asp:TextBox runat="server" ID="DefPhy" type="text" value="0" Width="80px" />
            </td>
            <td>
                Physics
            </td>
            <td colspan="2">
                <asp:TextBox runat="server" ID="AttPhy" type="text" value="0" Width="80px" />
            </td>
        </tr>
        <tr>
            <td>
                Math
            </td>
            <td colspan="2">
                <asp:TextBox runat="server" ID="DefMath" type="text" value="0" Width="80px" />
            </td>
            <td>
                Math
            </td>
            <td colspan="2">
                <asp:TextBox runat="server" ID="AttMath" type="text" value="0" Width="80px" />
            </td>
        </tr>
        <tr>
            <td>
                Experience gained
            </td>
            <td colspan="2">
                <asp:Label runat="server" ID="DefExp" type="text" Enabled="False" Width="80px" />
            </td>
            <td>
                Experience gained
            </td>
            <td colspan="2">
                <asp:Label runat="server" ID="AttExp" type="text" value="0" Enabled="False" Width="80px" />
            </td>
        </tr>
        <tr>
            <td>
                Chance for win
            </td>
            <td colspan="2">
                <asp:Label runat="server" ID="ChanceDef" type="text" Enabled="False" Width="80px" />
            </td>
            <td>
                Chance for win
            </td>
            <td colspan="2">
                <asp:Label runat="server" ID="ChanceAtt" type="text" value="0" Enabled="False" Width="80px" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
            </td>
            <td>
                <input id="Button2" type="button" value="<" onclick="return Button2_onclick()" />
            </td>
            <td colspan="2">
            </td>
            <td>
                <input id="Button3" type="button" value="<" />
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button ID="Button1" runat="server" Text="Submit" OnClick="Button1_Click" />
            </td>
            <td>
                <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
            </td>
        </tr>
    </table>

    <script language="javascript" type="text/javascript">
// <!CDATA[

function Button2_onclick() {
var dsLeft = document.getElementById("<%= DsDefLeft.ClientID %>");
var ds = document.getElementById("<%= DsDef.ClientID %>");
ds.value = dsLeft.value;
}

// ]]>
    </script>

</asp:Content>
